/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test;

import Communications.Multicast;
import java.util.*;

/**
 *
 * @author Harley
 */
public class Research {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        //  code application logic here
   Queue s;
   Multicast mc = new Multicast();
   s = mc.startMulticastServiceChannel();
   int count = 0;
   //synchronized(Research.class){
   
   
   while (true)
   {
       if (!s.isEmpty())
       {
           //count++;
           String t= (String)s.remove();
           s.remove(0);
           System.out.println(t);
           //the point: send cho chinh mimh -> loop forever
           //Multicast.getInstance().SendClient("tao nhan duoc!");
       }
   }
    }//}
    
}
